package jjn.carl.binary_tree;

import commons.TreeNode;

/**
 * @author Jiang Jining
 * @since 2023-07-13 0:04
 */
public class LeetCode226 {
    public TreeNode invertTree(TreeNode root) {
        if (root == null) {
            return root;
        }
        TreeNode left = root.left;
        TreeNode right = root.right;
        root.left = invertTree(left);
        root.right = invertTree(right);
        return root;
    }
}
